package com.taofuxn.admin.api.config;


import com.taofuxn.admin.api.model.SysUserModel;

/**
 * @author wong
 * @Date: 2020-05-06
 * @Version: 1.0
 */
public class CurrentUser {

    private static ThreadLocal<SysUserModel> current = new ThreadLocal<>();

    public static SysUserModel get(){
        return current.get();
    }

    public static void set(SysUserModel sysUserModel){
            if (null == sysUserModel)
            return;
        current.set(sysUserModel);
    }

    public static void remove(){
        current.remove();
    }

}
